package unit11.extractSubclass;

/**
 * @author v_irlwang
 * @date 2021/5/24
 */
public class LaborItem extends JobItem {

    private Employee employee;

    public LaborItem(int quantity, Employee employee) {
        super(0, quantity);
        this.employee = employee;
    }

    public Employee getEmployee() {
        return employee;
    }

    public boolean isLabor() {
        return true;
    }

    public int getUnitPrice() {
        return employee.getRate();
    }
}
